-
Notifications
You must be signed in to change notification settings - Fork 751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build Speed - using static git information for debug build config #5668
Conversation
- avoids commits causing module invalidation, increasing the build time
|
||
buildConfigField "String", "GIT_REVISION", "\"${gitRevision()}\"" | ||
buildConfigField "String", "GIT_REVISION_DATE", "\"${gitRevisionDate()}\"" | ||
buildConfigField "String", "GIT_BRANCH_NAME", "\"${gitBranchName()}\"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's quite annoying not to have the branch name. I use it to check that I am on the correct version when installing an APK built from Buildkite.
I guess I can live without that. Or we can include it when built on the CI, but not when built on a local computer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also agree, I find the branch name quite useful for quickly confirming build origins
I'll have a bit more of a play around which the separate cacheable module approach to see if there's a way to play nice with the SDK project (without resorting to releasing a another artifact)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with what @bmarty says. It would be good to get the branch name back
going to close and revisit the module + scripting approach after my current tasks are complete |
Type of change
Content
Only applies the git meta information to release builds, by dynamically including it in all build types we end up invalidating our local caches causing cascading compilation across the modules
Motivation and context
To speed up the build when no code changes have been made
Screenshots / GIFs
Notice the
dev
mentions instead of the current git sha for the debug buildTests
Setup
The next build after changing git sha...
Before
After
Hopefully in the future we'll be able to automate this benchmark gradle/gradle-profiler#335
**note build times are dependent on system specs
Tested devices